<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'opportunityContract.label', default: 'OpportunityContract')}"/>
    <title>商机-合同</title>
</head>

<body>
  <div class="main-body">
      <div class="page-wrapper">
          <!-- Page-header start -->
          <div class="page-header">
              <div class="page-header-title">
                  <h4>新增商机-合同</h4>
              </div>

              <div class="page-header-breadcrumb">
                  <ul class="breadcrumb-title">
                      <li class="breadcrumb-item">
                          <a href="/salesDashboard/index">
                              <i class="icofont icofont-home"></i>
                          </a>
                      </li>

                      <li class="breadcrumb-item">新增商机-合同</li>
                  </ul>
              </div>
          </div>
          <!-- Page-header end -->
          <!-- Page-body start -->
          <div class="page-body">
              <g:if test="${flash.message}">
                  <div class="message alert alert-info" role="status">${flash.message}
                      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                          <span aria-hidden="true">×</span></button>
                  </div>
              </g:if>
              <g:hasErrors bean="${this.opportunityContract}">
                  <ul class="errors" role="alert">
                      <g:eachError bean="${this.opportunityContract}" var="error">
                          <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                              <g:message error="${error}"/>
                          </li>
                      </g:eachError>
                  </ul>
              </g:hasErrors>
              <div class="card">
                  <div class="card-header">
                      <h5>新增商机合同信息</h5>

                      <div class="card-header-right">
                          <i class="icofont icofont-rounded-down"></i>
                      </div>
                  </div>

                  <div class="card-block">
                      <g:form action="save" class="form-horizontal">
                          <div class="form-group row">
                              <label class="col-md-2 control-label">商机</label>

                              <div class="col-md-3">
                                <input type="hidden" name="targetUri" value="${this.targetUri}" />
                                <g:textField name="opportunity" value="${this.opportunityContract?.opportunity?.id}" class="hidden"/>
                                <g:textField name="opportunitySerialNumber" disabled="disabled" value="${this.opportunityContract?.opportunity?.serialNumber}" class="form-control"/>

                              </div>
                              <label class="col-md-2 control-label">合同</label>

                              <div class="col-md-3">
                                <g:select name="contract.id" id="contract" value="${this.opportunityCOntract?.contract?.id}"
                                          from="${com.next.Contract.list()}" optionKey="id" optionValue="serialNumber"
                                          class="form-control"/>

                              </div>

                          </div>
                          <div class="form-group row">
                              <div class="col-md-12">
                                  <g:submitButton class="btn btn-info" name="create" value="保存"/>
                              </div>
                          </div>
                      </g:form>
                  </div>
              </div>
          </div>
      </div>

</body>
</html>
